-
Notifications
You must be signed in to change notification settings - Fork 285
Expand kinematics introduction with why/when guidance #3143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Expand kinematics introduction with why/when guidance #3143
Conversation
- Added 'Why use kinematics and odometry' section explaining benefits - Enhanced autonomous performance discussion (path following, position tracking) - Field-oriented control benefits for holonomic drives - Trajectory generation and common use cases - Added 'When to use each drivetrain type' section - Differential drive: best for traction, pushing power, simpler builds - Swerve drive: maximum maneuverability, most complex - Mecanum drive: holonomic with simpler mechanics than swerve - Added important considerations (drift, sensors, accuracy) - Links to example code for each drivetrain type Fixes wpilibsuite#1291
|
||
## Important considerations | ||
|
||
**Odometry drift**: Position estimates accumulate error over time, especially during physical contact with other robots. This is normal and expected. Vision-based corrections (using AprilTags) help maintain accuracy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Odometry drift**: Position estimates accumulate error over time, especially during physical contact with other robots. This is normal and expected. Vision-based corrections (using AprilTags) help maintain accuracy. | |
**Odometry drift**: Position estimates accumulate error over time, especially during physical contact with other robots and field elements. This is normal and expected. Vision-based corrections (using AprilTags) help maintain accuracy. |
- Gyroscope for measuring robot angle (critical for accurate odometry) | ||
- For swerve: absolute encoders for module angles | ||
|
||
**Autonomous period accuracy**: Odometry is typically very accurate during autonomous (15 seconds) because there's less robot-to-robot contact. Estimates may drift more during teleoperation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Autonomous period accuracy**: Odometry is typically very accurate during autonomous (15 seconds) because there's less robot-to-robot contact. Estimates may drift more during teleoperation. | |
**Autonomous period accuracy**: Odometry is typically very accurate during autonomous (15 seconds) because there's less robot-to-robot contact. Estimates may drift more during teleop. |
Using language from the manual. TELEOP is in the glossary for "the Teleoperated Period".
Perhaps the comparison between different drivetrain types fits more elsewhere? |
|
||
**Match strategy**: Plan routes that avoid defense, optimize cycle times, coordinate with alliance partners | ||
|
||
## When to use each drivetrain type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels really out of place to talk about drivetrain selection in kinematics/odometry. The drivetrain selection should drive the code, and these characteristics have nothing to do with kinematics or odometry.
- Requires precise module control and calibration | ||
- Can use high-traction wheels | ||
|
||
**Example code**: See the SwerveBot and SwerveControllerCommand examples in :doc:`/docs/software/examples-tutorials/wpilib-examples` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given wpilibsuite/allwpilib#5098 I'm not sure I'd recommend the WPILib examples.
### Mecanum Drive | ||
|
||
**Best for:** | ||
- Teams wanting holonomic drive with simpler mechanics than swerve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to the slipping problem, I think the simpler mechanics is more theoretical then practical
**Odometry drift**: Position estimates accumulate error over time, especially during physical contact with other robots. This is normal and expected. Vision-based corrections (using AprilTags) help maintain accuracy. | ||
|
||
**Sensor requirements**: All kinematics implementations require: | ||
- Encoders for measuring wheel/module speeds and positions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reasoning for mentioning module speeds and positions? Isn't module speed the same as wheel speed and module position is covered below.
- Robots that benefit from strafing but don't need maximum pushing power | ||
- When compactness is important | ||
|
||
**Characteristics:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you do accurate odometry on mecanum? Or do you need vision?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this depends on:
- What do you consider accurate? Its tolerances are not good compared to other options but if you need broad strokes movement like in some shooting games it is just fine without.
- A dead wheel significantly helps. It adds complexity but not having one can give more inconsistent results
- How complex is the movement and at what speeds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was statements like these that make me question. https://www.chiefdelphi.com/t/end-of-mecanum-drive/433615/119
|
||
**Self-correction**: Combined with vision systems (like AprilTag detection), odometry can be continuously updated to correct for drift and maintain accuracy throughout a match. | ||
|
||
### Field-Oriented Control |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really related to kinematics and odometry?
|
||
**Vision-assisted driving**: Use AprilTags or other vision targets to update odometry and drive to precise field locations | ||
|
||
**Teleoperation enhancement**: Field-oriented control for intuitive driving of holonomic robots |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other then gyro, you don't need kinematics or odometry for field oriented control, right?
Changes based on reviewer feedback: 1. Removed "When to use each drivetrain type" section - reviewers felt drivetrain selection should drive code choice, not vice versa, and these characteristics aren't directly related to kinematics/odometry 2. Removed "Field-Oriented Control" section - field-oriented control doesn't require full kinematics/odometry (just gyro), so it was misleading to include here 3. Replaced WPILib example references with vendor examples that follow best practices: - CTRE Phoenix6 examples (differential and swerve with PathPlanner) - REV MAXSwerve Template - YAGSL (Yet Another Generic Swerve Library) This addresses allwpilib#5098 which notes WPILib swerve examples use quadrature encoders instead of absolute encoders 4. Added mecanum odometry accuracy considerations including: - Wheel slipping issues - Benefits of dead wheels for improved accuracy - Vision-based correction recommendations 5. Applied minor wording improvements: - Added "and field elements" to odometry drift explanation - Changed "teleoperation" to "the Teleoperated Period" per manual glossary - Simplified sensor requirements to remove confusing "module speeds and positions" wording 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Summary
Significantly expands the kinematics introduction article to address issue #1291 by explaining why teams should use kinematics/odometry and when to choose each drivetrain type.
Changes
New "Why use kinematics and odometry?" Section
New "When to use each drivetrain type" Section
Differential Drive:
Swerve Drive:
Mecanum Drive:
Important Considerations
Impact
This expansion transforms the article from a purely technical reference into a practical guide that helps teams:
Fixes #1291